//
//  HMStatusBottomView.swift
//  sinaweibo
//
//  Created by WGP on 16/4/14.
//  Copyright © 2016年 WGP. All rights reserved.
//

import UIKit

class HMStatusBottomView: UIView {
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setupSubviews()
    }
    
    
//    MARK: - 私有方法
    private func setupSubviews()
    {
//        1.添加控件
        addSubview(retweetButton)
        addSubview(commentBuuton)
        addSubview(likeButtton)
        addSubview(separatorViewFirst)
        addSubview(separatorViewSecond)
        
//        2.添加约束
        retweetButton.snp_makeConstraints { (make) -> Void in
            make.left.top.bottom.equalTo(self)

        }
        
        commentBuuton.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(retweetButton.snp_right)
            make.top.bottom.equalTo(self)
            make.width.equalTo(retweetButton)
        }
        
        likeButtton.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(commentBuuton.snp_right)
            make.top.bottom.equalTo(self)
            make.width.equalTo(commentBuuton)
            make.right.equalTo(self)
        }
        
        separatorViewFirst.snp_makeConstraints { (make) -> Void in
            make.centerX.equalTo(retweetButton.snp_right)
            make.centerY.equalTo(retweetButton)
        }
        
        separatorViewSecond.snp_makeConstraints { (make) -> Void in
            make.centerX.equalTo(commentBuuton.snp_right)
            make.centerY.equalTo(commentBuuton)
        }
    }
    
    
    
//    MARK: - 懒加载
//    转发按钮
    private lazy var retweetButton: UIButton = UIButton(image: "timeline_icon_retweet",title: "转发")
    
//    评论按钮
   private lazy var commentBuuton: UIButton = UIButton(image: "timeline_icon_comment",title: "评论")
    
//    赞按钮
       private lazy var likeButtton: UIButton = UIButton(image: "timeline_icon_unlike",title: "赞")
    
//    分割线1
    private  lazy var separatorViewFirst: UIImageView = UIImageView(imageName: "timeline_card_bottom_line")
    
//    分割线2
    private lazy var separatorViewSecond: UIImageView = UIImageView(imageName: "timeline_card_bottom_line")
    
}














